import http from '../request/axios';
import { IGarbageEdit, IGarbageModelEdit, IGarbageCustomerList } from 'type/api.type';
/**
 * @description: 修改用户信息关联的垃圾费模型
 * @param {IGarbageEdit} params
 * @return {Promise}
 */
export const UpdateGarbage = (params: IGarbageEdit): Promise<any> => {
  return http.apiPost({
    url: '/trash/customertrashfee/save',
    data: params,
  });
};
/**
 * @description: 查询垃圾费算费模型列表
 * @return {Promise}
 */
export const QueryGarbageModel = (): Promise<any> => {
  return http.apiGet('/costModel/getGarbageFeeModelList');
};

/**
 * @description: 更新垃圾费算费模型价格
 * @param {IGarbageModelEdit} params
 * @return {Promise}
 */
export const UpdateGarbageModel = (params: IGarbageModelEdit): Promise<any> => {
  return http.apiPost({
    url: '/costModel/updateById',
    data: params,
  });
};

/**
 * @description: 查询垃圾费-客户列表
 * @param {IGarbageCustomerList} params
 * @return {Promise}
 */
export const QueryGarbageCustomerList = (params: IGarbageCustomerList): Promise<any> => {
  return http.apiPost({
    url: '/api/trash/customertrashfee/queryCustomerInfo',
    data: params,
  });
};
